Skip to content

feat(opencode): purpose designations + decision/embed/Groq purpose pools (#13675 Parts 1+3a) - #13689

Merged
dezren39 merged 1 commit into
mainfrom
lane-decapi-config
Nov 23, 2026
Merged

dezren39 merged 1 commit into
mainfrom
lane-decapi-config

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Lane DECISION-API Worker A — Parts 1 + 3a of #13675 (config + checker slice). Proxy slice (Part 2) is a separate worker; this PR does not touch bin/opencode-route-proxy.mjs.

What lands

  • model_designations top-level registry in .opencode/opencode.jsonc (dated 2026-11-23 comment citing Decision API + non-LLM endpoints: purpose designations, native endpoint dispatch, decision pool wiring (Jev + Google Decision free-first, Luna harness experiment) #13675), keyed by bare model id → {purposes, capabilities}. Closed vocabularies — purposes: chat, decision, embed, rerank, recommend, transcribe, speak, guard (incl. the coordination extension); capabilities: visual, pdf, audio-in, audio-bidir, tts, stt. Pool-level "purpose" on model_routes entries (absent = chat).
  • Checker (bin/check-opencode-route-rules.mjs): inspectRouteRules now walks every pool in model_routes with the existing resolver (provider-route expansion + instanceOf following) and enforces (a) designated leaf ⇒ pool purpose ∈ its purposes, (b) closed vocabularies for designation + pool purpose values, (c) a model designated without chat never resolves into a chat-purpose pool — the systemone convention mechanised. 7 new tests prove each rule fires and passes.
  • systemone: "purpose": "decision", targets zen-plans/jev-1.13-free + google-free/gemini-decision-1, weights 3/3. Paid Zen legs (jev-1.13, gpt-6-luna-decision, gemini-decision-1) stay OFF (paste-ready comment kept accurate).
  • Designations: jev-1.13-free / jev-1.13 / gpt-6-luna-decision / gemini-decision-1 → [decision]; gemini-embedding-2 / gemini-embedding-001 → [embed]; Groq shelf below.
  • New pools: gemini-embed-plan (embed, google-free embedding pair, round-robin 3/3), stt-plan (transcribe), tts-plan (speak), prompt-guard-plan (guard).
  • Google aliases: the four free google.* provider blocks gain options.endpoints — decision: {kind: google-decisions, path: /decisions}, embed: {kind: google-embed, path: /models/{model}:embedContent}. google.developing-today untouched.

Groq verification (config catalog is the evidence)

Verified in the groq provider block of this config: whisper-large-v3, whisper-large-v3-turbo → transcribe [stt, audio-in]; meta-llama/llama-prompt-guard-2-22m, meta-llama/llama-prompt-guard-2-86m → guard. playai-tts is NOT in the catalog (Groq shut PlayAI TTS down) — the catalog's verified TTS shelf is canopylabs/orpheus-v1-english + canopylabs/orpheus-arabic-saudi, designated speak [tts] and seated in tts-plan instead. Gap recorded in config comments.

Live probe (evidence gate, before seating)

POST https://generativelanguage.googleapis.com/v1beta/decisions with the muse project key (fetched by name google.gemini-api-key via fleet secrets get; value never recorded), documented shape {"model":"gemini-decision-1","input":"I was charged twice for my order.","questions":{"is_billing":{"type":"noul","instructions":"Is this a billing problem?"}}} → HTTP 200, answers.is_billing = {noul: 0.99, confidence: 0.99, type: "noul"}, usage 96 input / 0 output tokens. So the google leg is seated.

Validation

  • node bin/check-opencode-route-rules.mjs — passed
  • node bin/check-opencode-metered-providers.mjs — passed
  • node bin/check-opencode-go-seating.mjs — fails identically on unmodified main (4 Go leaves with no successful route attempt in the live window; a live-state check, pre-existing, unrelated to this diff)
  • node --test suites: route-rules 30/30, metered + go-seating 32/32

Coordination

Checked open PRs before editing: no WIRE-FREE (#13677) config PR was in flight (that lane was still in prep), so this branch is based on main (2d21fb369b5). WIRE-FREE rebases on this once landed, per the coordination comments on #13675/#13677.

Refs #13675


Run Proof on this PR
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…ols (#13675 Parts 1+3a)

- New top-level model_designations registry (closed purpose/capability
  vocabularies) and pool-level "purpose" on model_routes (absent = chat).
- bin/check-opencode-route-rules.mjs enforces designations over EVERY
  pool (same resolver: provider-route expansion + instanceOf following):
  designated leaf must match pool purpose, vocabularies are closed, and
  a model designated without chat can never resolve into a chat pool
  (the systemone convention, mechanised). 7 new tests; all suites green.
- systemone: purpose "decision"; second leg google-free/gemini-decision-1
  (weights 3/3), seated only after a live probe of POST /v1beta/decisions
  with the muse project key returned 200 (evidence on #13675). Paid Zen
  legs (jev-1.13, gpt-6-luna-decision, gemini-decision-1) stay OFF.
- New purpose pools: gemini-embed-plan (embed), stt-plan (transcribe,
  Groq Whisper), tts-plan (speak, Groq Orpheus - playai-tts is absent
  from the groq catalog), prompt-guard-plan (guard, Groq prompt-guard).
- The four free google.* aliases gain options.endpoints descriptors
  (google-decisions /decisions, google-embed /models/{model}:embedContent);
  google.developing-today untouched.
@dezren39
dezren39 merged commit 74a7dff into main Nov 23, 2026
1 check passed
@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 1 minute.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 57fb5dec-6c0f-4e30-8a4b-b75b9629707d
Commits

Reviewing files that changed from the base of the PR and between 2d21fb3 and dddb776.

Files selected for processing: 3

  • .opencode/opencode.jsonc
  • bin/check-opencode-route-rules.mjs
  • bin/check-opencode-route-rules.test.mjs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

audit:partial PR partially implemented; gap filed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant